from django.urls import path
from .views import account, home, project, manage, wiki

urlpatterns = [
    path('register/', account.register, name='register'),
    path('send/sms/', account.send_sms, name='send_sms'),
    path('login/sms/', account.login_sms, name='login_sms'),
    path('login/', account.login, name='login'),
    path('image/code/', account.image_code, name="image_code"),
    path('index/', home.index, name="index"),
    path('logout/', account.logout, name="logout"),
    # 项目列表
    path('project/list/', project.project_list, name='project_list'),
    # project/star/my/1
    # project/star/my/1
    path('project/star/<str:project_type>/<int:project_id>/', project.project_star, name='project_star'),
    path('project/unstar/<str:project_type>/<int:project_id>/', project.project_unstar, name='project_unstar'),
    # 项目管理
    path('manage/<int:project_id>/dashboard/', manage.dashboard, name='manage_dashboard'),
    path('manage/<int:project_id>/issues/', manage.issues, name='manage_issues'),
    path('manage/<int:project_id>/statistics/', manage.statistics, name='manage_statistics'),
    path('manage/<int:project_id>/file/', manage.file, name='manage_file'),
    path('manage/<int:project_id>/wiki/', wiki.wiki, name='manage_wiki'),
    path('manage/<int:project_id>/wiki/add/', wiki.wiki_add, name='manage_wiki_add'),
    path('manage/<int:project_id>/wiki/catalog/', wiki.wiki_catalog, name='manage_wiki_catalog'),
    path('manage/<int:project_id>/wiki/delete/<int:wiki_id>', wiki.wiki_delete, name='manage_wiki_delete'),
    path('manage/<int:project_id>/wiki/edit/<int:wiki_id>', wiki.wiki_edit, name='manage_wiki_edit'),
path('manage/<int:project_id>/wiki/upload/', wiki.wiki_upload, name='manage_wiki_upload'),
    path('manage/<int:project_id>/setting/', manage.setting, name='manage_setting'),
]
